package com.itlong.cloud.POJO.PO;

import com.itlong.cloud.annotation.ItlField;
import com.itlong.cloud.annotation.ItlTables;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * <desc>
 *      消息任务表
 * </desc>
 *
 * @createDate 2017/11/16
 */
@ItlTables("time_task_dead_message_queue")
@Data
@NoArgsConstructor
public class TimeTaskDeadMessageQueuePO extends BasePO implements Serializable {

    @ItlField("id")
    private Integer id;
    @ItlField(value = "correlation_id",logicKey = "key")
    private String correlationId;   //消息唯一ID
    @ItlField("routing_key")
    private String routingKey;     //消息路由key
    @ItlField("exchange")
    private String exchange;        //交互机
    @ItlField("message_content")
    private String messageContent;//消息内容
    @ItlField("message_status")
    private Integer messageStatus; //消费状态 0：未消费 1：已消费
    @ItlField("consumer_num")
    private Integer consumerNum;   //消费触发次数，每次从此表发送消息时需要递增
    @ItlField("queue_name")
    private String queueName;      //队列名称
    @ItlField("message_time")
    private Date messageTime;      //消息时间

    public TimeTaskDeadMessageQueuePO(Integer id, String correlationId, String routingKey, String exchange, String messageContent, Integer messageStatus, Integer consumerNum, String queueName) {
        this.id = id;
        this.correlationId = correlationId;
        this.routingKey = routingKey;
        this.exchange = exchange;
        this.messageContent = messageContent;
        this.messageStatus = messageStatus;
        this.consumerNum = consumerNum;
        this.queueName = queueName;
    }
}
